package main

import (
	"fmt"
)

func main() {
	var Phone Phone
	Phone = new(NokiaPhone)
	Phone.call()

	Phone = new(IPhone12)
	Phone.call()
}

/* 定义接口 */
type Phone interface {
	call()
}

/* 定义结构体 */
type NokiaPhone struct {
}

type IPhone12 struct {
}

/* 实现接口方法 */
func (nokiaPhone NokiaPhone) call() {
	fmt.Println("NokiaPhone call")
}

func (nokiaPhone IPhone12) call() {
	fmt.Println("IPhone12 call")
}
